package com.jiahe.yehua.statistics.controller;


import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import com.jiahe.yehua.common.result.Result;
import com.jiahe.yehua.order.OrderFeignClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 阿良
 * @version 1.0
 * @date 2021/9/13 14:13
 */
@Api(tags = "预约统计表")
@RestController
@RequestMapping("/admin/statistics")
public class StatisticsController {

    @Autowired
    private OrderFeignClient orderFeignClient;

    @ApiOperation("获取预约统计数据")
    @GetMapping("getCountMap")
    public Result getCountMap(OrderCountQueryVo orderCountQueryVo) {
        Map<String, Object> countMap = orderFeignClient.getCountMap(orderCountQueryVo);
        System.out.println(countMap);
        return Result.ok(countMap);
    }
}
